SELECT T.*,
T_USER_GROUP.CODE AS USER_GROUP_CODE,
T_USER_GROUP.NAME AS USER_GROUP_NAME,
T_ROLE.CODE       AS ROLE_CODE,
T_ROLE.NAME       AS ROLE_NAME
FROM C1_US_GROUP_ROLE T
LEFT JOIN C1_USER_GROUP T_USER_GROUP
ON (T_USER_GROUP.id = t.user_group_id)
LEFT JOIN C1_ROLE T_ROLE
ON (T_ROLE.id = t.ROLE_ID)
WHERE T.id          = :id